/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.bayu.services.entity;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 *
 * @author Bayu
 */
@Entity
@Table(name = "exchange_rate")
@NamedQueries({@NamedQuery(name = "ExchangeRate.findAll", query = "SELECT e FROM ExchangeRate e"), @NamedQuery(name = "ExchangeRate.findById", query = "SELECT e FROM ExchangeRate e WHERE e.id = :id"), @NamedQuery(name = "ExchangeRate.findByRpusd", query = "SELECT e FROM ExchangeRate e WHERE e.rpusd = :rpusd"), @NamedQuery(name = "ExchangeRate.findByRpjpy", query = "SELECT e FROM ExchangeRate e WHERE e.rpjpy = :rpjpy"), @NamedQuery(name = "ExchangeRate.findByRemarks", query = "SELECT e FROM ExchangeRate e WHERE e.remarks = :remarks")})
public class ExchangeRate implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "id")
    private Long id;
    @Basic(optional = false)
    @Column(name = "rpusd")
    private double rpusd;
    @Basic(optional = false)
    @Column(name = "rpjpy")
    private double rpjpy;
    @Basic()
    @Column(name = "remarks")
    private String remarks;

    public ExchangeRate() {
    }

    public ExchangeRate(Long id) {
        this.id = id;
    }

    public ExchangeRate(Long id, double rpusd, double rpjpy, String remarks) {
        this.id = id;
        this.rpusd = rpusd;
        this.rpjpy = rpjpy;
        this.remarks = remarks;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public double getRpusd() {
        return rpusd;
    }

    public void setRpusd(double rpusd) {
        this.rpusd = rpusd;
    }

    public double getRpjpy() {
        return rpjpy;
    }

    public void setRpjpy(double rpjpy) {
        this.rpjpy = rpjpy;
    }

    public String getRemarks() {
        return remarks;
    }

    public void setRemarks(String remarks) {
        this.remarks = remarks;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof ExchangeRate)) {
            return false;
        }
        ExchangeRate other = (ExchangeRate) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.bayu.services.entity.ExchangeRate[id=" + id + "]";
    }

}
